package com.nzd.slsharing.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.nzd.slsharing.pojo.LoginForm;
import com.nzd.slsharing.pojo.RegisterForm;
import com.nzd.slsharing.pojo.User;


public interface UserService extends IService<User> {
    /**
     * 登录
     * @param loginForm
     * @return
     */
    User login(LoginForm loginForm);

    /**查找用户(登录请求)
    */
    User getUserByStudentIdAndUP(String studentId,String username,String password);


    /**查找用户(学号)
     */
    User getUserByStudentId(String studentId);

    /*注册
     */
    Integer register(RegisterForm registerForm);
    /**查找是否存在相同学号、用户名
     */
    User getUserByNameAndStudentId(String username,String studentId);

    /**
     * 分页获取所有Admin信息【带条件】
     */
    IPage<User> getUsers(Page<User> pageParam, String adminName);

    //通过学号删除
    Integer removeByStudentId(String studentId);
}
